<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>简单个人页面</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content= "no-cache, must-revalidate">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css" />
    <link rel="stylesheet" href="/css/reset.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <script src="/js/common.js"></script>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/checkLogin.js"></script>
    <script>
        $(function () {
            <!--填充界面的数据-->
            $('.simplePerson').renderValues(user);
            <!--注销操作-->
            $('#logout').click(function () {
                $.ajax({
                    url:baseUrl+'/sessions',
                    method:'delete',
                    success:function () {
                        //删除浏览器的用户信息
                        sessionStorage.removeItem('user');
                        $(document).dialog({
                            position:'center',
                            content: '注销成功!',
                        })
                        setTimeout(function () {
                            window.parent.location.href='/index.html';
                        },1000);
                    }
                });
            });

            //点击头像前往个人页面
            $("#myHead").click(function () {
                //获得隐藏的id
                var id = $("#id").html();
                window.parent.location.href="/userProfiles.html?id=" + id;
            })
        });
    </script>

</head>
<body>
<div class="simplePerson"   style="background-image:url(/img/a33.bmp)">
    <span render-html="id" hidden id="id" ></span>
    <img  class="rounded-circle" width="20%" render-src="headImgUrl" id="myHead">
    <p><strong render-html="nickName"></strong></p>
    <p render-html="email"></p>
    <hr>
    <div class="mymenu">
        <i class="fa fa-user fa-2x fa-fw"></i>
        <a href="/mine/profiles.html" target="_parent" >
            我的</a>
    </div>
    <div class="mymenu">
        <i class="fa fa-bell fa-2x fa-fw"></i>
        <a href="/mine/message.html" target="_parent">信息</a>
    </div>
    <div class="mymenu">
        <i class="fa fa-comment fa-2x fa-fw"></i>
        <a href="/mine/message.html" target="_parent">通知</a>
    </div>
    <div class="mymenu">
        <i class="fa fa-cog fa-2x fa-fw"></i>
        <a href="/mine/info.html" target="_parent">设置</a>
    </div>
    <hr style="margin-top: 50px;">
    <div class="mymenu">
        <i class="fa fa-sign-out fa-2x fa-fw"></i>
        <label id="logout">退出登录</label>
    </div>
</div>



</body>
 <style>
        .simplePerson {
            text-align: center;
            color: #7A786F;
            padding-top: 50px;
            padding-bottom: 110px;
            background-color: #E8E6E8;
        }

        .mymenu {
            margin: 15px auto;
        }

        .mymenu i {
            margin-right: 20px;
        }

    </style>
</html>